﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace 盎宇宙服务
{
    /// <summary>
    /// QRWindows.xaml 的交互逻辑
    /// </summary>
    public partial class QRWindows : Window
    {
        private static QRWindows instance1;
        private static QRWindows instance2;
        public QRWindows()
        {
            InitializeComponent();
        }

        public static QRWindows GetInstance1()
        {
            if(instance1 ==null || !instance1.IsLoaded)
            {
                instance1 = new QRWindows();
            }
            return instance1;
        }

        public static QRWindows GetInstance2()
        {
            if (instance2 == null || !instance2.IsLoaded)
            {
                instance2 = new QRWindows();
            }
            return instance2;
        }

        public void ShowQRwindows1(int x,int y)
        {
            instance1.Left = x;
            instance1.Top = y;
            instance1.Visibility= Visibility.Visible;
        }

        public void HideQRwindows1()
        {
            instance1.Visibility= Visibility.Hidden;
        }

        public void ShowQRwindows2(int x, int y)
        {
            instance2.Left = x;
            instance2.Top = y;
            instance2.Visibility = Visibility.Visible;
        }

        public void HideQRwindows2()
        {
            instance2.Visibility = Visibility.Hidden;
        }
    }
}
